#ifndef QSELECTTOOL_H
#define QSELECTTOOL_H

#include <QGraphicsItem>
#include <QVector>
#include <QPointF>
#include "qtoolgraphicsscene.h"
#include "../Controller/centralController.h"
#include"qmytool.h"
class TopLeftPoint;
class TopRightPoint;
class BottomRightPoint;
class BottomLeftPoint;
class TopCenterPoint;
class RightCenterPoint;
class RotationCenterPoint;
class RotationControlPoint;
class QSelectEditTool : public QMyTool
{
    Q_OBJECT
public:
	//centralController* controller;
	int time;
	int ObjectIndex;
	QPointF tlp; 
	QPointF trp;
	QPointF blp;
	QPointF brp;
	QPointF rcp;
	QPointF rconp;
	QPointF tcp;
	QPointF rcenterp;
	qreal oriwidth;
	qreal oriheight;
	TopLeftPoint* topleftpoint;
	TopRightPoint* toprightpoint;
	BottomLeftPoint* bottomleftpoint;
	BottomRightPoint* bottomrightpoint;
	RotationCenterPoint* rotationcenterpoint;
	RotationControlPoint* rotationcontrolpoint;
	TopCenterPoint* topcenterpoint;
	RightCenterPoint* rightcenterpoint;
    explicit QSelectEditTool(QObject *parent = 0);
    ~QSelectEditTool();
    //bool SetContainer(QToolGraphicsScene * container);
	bool SetController(centralController* controller);
	virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent){}
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
	virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
	virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent );
	void initinal();
	QTransform Translation;
	QTransform Skew;
	QTransform Scale;
	QTransform Rotation;
	QTransform AxisTrans;
	void showPoints();
	void hidePoints();
	void updatePoints();
	void sendMessage();
	QGraphicsItem* currentItem;
private:

	

signals:
    
public slots:
    
};

#endif // QSELECTTOOL_H